﻿using OnWork.DataCenter.DAL.Common;
using SqlSugar;

namespace OnWork.DataCenter.DAL.DataCenter
{
    /// <summary>
    /// 数据库存储
    /// </summary>
    public class DSMqttStorage : BaseEntity
    {
        /// <summary>
        /// MQTTTtopic配置的ID
        /// </summary>
        public long MqttTopicID { get; set; }

        ///// <summary>
        /////流程配置
        ///// </summary>
        //[SugarColumn(IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
        //public string ProcessConfig { get; set; }

        /// <summary>
        /// 关联MQTT配置里的 主题
        /// </summary>
        [Navigate(NavigateType.ManyToOne, nameof(MqttTopicID))]
        public DSMqttTopic Topic { get; set; } //不能赋值只能是null

        /// <summary>
        ///任务配置展示
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
        public string TaskConfigView { get; set; }


        /// <summary>
        /// 流程图配置
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
        public string DiagramData { get; set; }
    }
}